package com.github.iot.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Generated;

/**
 * 用户信息
 *
 * @Author: 梁声洪
 * @Date: 2019/12/7 10:47
 * @Version: v1.0.0
 */
@Entity
public class User {

    /**
     * 主键ID
     */
    @Id(autoincrement = true)
    private Long id;

    /**
     * 昵称
     */
    @NotNull
    private String nickname;

    /**
     * 登录账号
     */
    @NotNull
    private String username;

    /**
     * 登录密码
     */
    @NotNull
    private String password;

    /**
     * 类型 1 超级管理员  2 管理员  3 使用者
     */
    @NotNull
    private Integer type;

    @Generated(hash = 1071416043)
    public User(Long id, @NotNull String nickname, @NotNull String username,
            @NotNull String password, @NotNull Integer type) {
        this.id = id;
        this.nickname = nickname;
        this.username = username;
        this.password = password;
        this.type = type;
    }

    @Generated(hash = 586692638)
    public User() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    
}